import React, { Component } from 'react'
import { HashRouter, Route, Switch } from 'react-router-dom'
import Main from './Main'
import About from './About'
import Topic from './../route1/Topic'
import Home from './Home'
import NoMatch from './NoMatch'
class IRoute extends Component{

    render() {
        return (
            <HashRouter>
                <Home>
                    <Switch>
                        <Route path="/main"  render={() =>
                            <Main>
                                <Route path="/main/:value" component={About}></Route>
                            </Main>
                        }></Route>
                        <Route path="/about" component={About}></Route>
                        <Route path="/topics" component={Topic}></Route>
                        <Route component={NoMatch}></Route>
                    </Switch>
                </Home>
            </HashRouter>
        )
    }
}

export default IRoute